package com.cloudkinto.vo.cost;

import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.math.BigDecimal;

@Data
@AllArgsConstructor
@NoArgsConstructor
public class Size {
    @ApiModelProperty("高 公制")
    private BigDecimal height;
    @ApiModelProperty("高 英制")
    private BigDecimal heightBs;
    @ApiModelProperty("长 公制")
    private BigDecimal length;
    @ApiModelProperty("长 英制")
    private BigDecimal lengthBs;
    @ApiModelProperty("宽 公制")
    private BigDecimal width;
    @ApiModelProperty("宽 英制")
    private BigDecimal widthBs;
    @ApiModelProperty("重量 公制")
    private BigDecimal weight;
    @ApiModelProperty("重量 英制")
    private BigDecimal weightBs;

    public BigDecimal getHeight() {
        if (height == null) return new BigDecimal(0);
        return height;
    }

    public BigDecimal getHeightBs() {
        if (heightBs == null) return new BigDecimal(0);
        return heightBs;
    }

    public BigDecimal getLength() {
        if (length == null) return new BigDecimal(0);
        return length;
    }

    public BigDecimal getLengthBs() {
        if (lengthBs == null) return new BigDecimal(0);
        return lengthBs;
    }

    public BigDecimal getWidth() {
        if (width == null) return new BigDecimal(0);
        return width;
    }

    public BigDecimal getWidthBs() {
        if (widthBs == null) return new BigDecimal(0);
        return widthBs;
    }

    public BigDecimal getWeight() {
        if (weight == null) return new BigDecimal(0);
        return weight;
    }

    public BigDecimal getWeightBs() {
        if (weightBs == null) return new BigDecimal(0);
        return weightBs;
    }
}
